﻿<UserControl x:Class="ETRobocon.RaceTraking.GameManagement.RaceMgmtConsole"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:src="clr-namespace:ETRobocon.RaceTraking.GameManagement"
    Height="265" Width="300">
    <DockPanel Height="Auto" Name="MainDoc">
        <DockPanel.Resources>
            <src:ListContest x:Key="ContestList"/>
            <HierarchicalDataTemplate DataType="{x:Type src:ERContest}" ItemsSource="{Binding Path=Games}">
                <TextBlock Text="{Binding Path=Name}"/>
            </HierarchicalDataTemplate>
            <HierarchicalDataTemplate DataType="{x:Type src:ERGame}" ItemsSource="{Binding Path=Rounds}">
                <TextBlock Text="{Binding Path=Name}"/>
            </HierarchicalDataTemplate>
            <DataTemplate DataType="{x:Type src:ERRound}">
                <TextBlock Text="{Binding Path=RoundNo}"/>
            </DataTemplate>
        </DockPanel.Resources>
        <Label DockPanel.Dock="Top">Round Selection</Label>
        <Button Name="buttonStartRound" DockPanel.Dock="Top" Margin="2,2,2,2" Click="buttonStartRound_Click">Start</Button>
        <TreeView Name="treeViewContests" DockPanel.Dock="Top">
            <TreeViewItem ItemsSource="{Binding Source={StaticResource ContestList}}"
                          Header="ET Robocon Contests"
                          Selected="TreeViewItem_Selected"
                          />
        </TreeView>
        <StackPanel Name="stackPanelCurrentRound" DockPanel.Dock="Bottom" Opacity="0" Background="AliceBlue">
            <TextBlock Name="textBoxStatus"></TextBlock>
            <TextBlock Name="textBoxContest"></TextBlock>
            <TextBlock Name="textBoxGame"></TextBlock>
            <TextBlock Name="textBoxRound"></TextBlock>
            <TextBlock Name="textBoxRoundNo"></TextBlock>
        </StackPanel>
    </DockPanel>
</UserControl>
